package hui.com.controller.perms;

import hui.com.authority.UsersLogEntity;
import hui.com.model.res.MyResponse;
import hui.com.authority.Authority;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@CrossOrigin(origins = "*")//处理跨源资源共享
@RequestMapping("/public")
@Controller
public class perms {
    @Authority("sales_show")
    @PostMapping("/getSales")
    @ResponseBody
    public Object getSales(@RequestBody UsersLogEntity user){

        return MyResponse.builder().code(400).msg("阿巴啊吧啊吧").build();

    };

    @Authority("admin")
    @PostMapping("/getAdmin")
    @ResponseBody
    public Object getAdmin(@RequestBody UsersLogEntity user){

        return MyResponse.builder().code(400).msg("阿巴啊吧啊吧").build();

    };
}
